﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CMP.ERP.Model;
using CMP.ERP.DAL;
using System.Data;

namespace CMP.ERP.BLL
{
    public class Role_Option1BLL
    {
        Role_Option1DAL dal = new Role_Option1DAL();
        
        /// <summary>
        /// 获取角色
        /// </summary>
        /// <returns></returns>
        public DataTable Role()
        {
            return dal.Role();
        }

        /// <summary>
        /// 根据ID获取权限
        /// </summary>
        /// <param name="pid"></param>
        /// <returns></returns>
        public DataTable Option(int pid)
        {
            return dal.Option(pid);
        }
        /// <summary>
        /// 根据角色编号获取权限编号
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        public DataTable getOidbyrid(int rid)
        {
            return dal.getOidbyrid(rid);
        }
        /// <summary>
        /// 删除权限
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        public int update(int rid)
        {
            return dal.update(rid);
        }
        /// <summary>
        /// 修改权限
        /// </summary>
        /// <param name="Rid"></param>
        /// <param name="Oid"></param>
        /// <returns></returns>
        public int add(int Rid, string Oid)
        {
            return dal.add(Rid, Oid);
        }
    }
}
